function [ RateMatrix ] = BuildRateMatrix( uDataURL,uNumber,iNumber )
%BuildRateMatrix �������ֵľ���
%   uData:ԭʼ��ݼ���ʽ����ʽΪ1	1	5	874965758 ----��user id | item id | rating | timestamp
%   uNumber:�û�����    iNumber:item����
RateMatrix = zeros(uNumber,iNumber); %��ʼ�����־���

%% read the baseFile
FID = fopen(uDataURL,'r');
[uDataTemp,count] = fscanf(FID,'%d\t%d\t%d\t%d');
fclose(FID);
t=1;line=1;
while(t<=count/4)
    for  i=1:1:4
        uData(t,i) = uDataTemp(line,1);
        line = line + 1;
    end
    t = t+1;
end

%% build the rate matrix
for i=1:1:count/4
    RateMatrix(uData(i,1),uData(i,2)) = uData(i,3);
end

end

